home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1995 October
/
EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso
/
Aminet
/
comm
/
net
/
sana2_cslip.readme
< prev
next >
Wrap
Text File
|
1995-07-02
|
5KB
|
128 lines
Short: SANA2 (c)slip device
Uploader: rhialto@mbfys.kun.nl (Olaf Seibert)
Type: comm/net
Version: 15-Aug-1993
This is a modified version of Commodores example SANA driver:
the slip.device. As released, it contained a number of bugs and
misfeatures.
Installation:
------------
- It is best to get the full, original SANA developer package. It
is available on Fish disk number 779. Newer versions may be
available by ftp.
- Summary: Place the file (c)slip.device in DEVS:Networks/ and
(c)slip<unit>.config in ENV(ARC):SANA2/.
Additions:
---------
- Now also header-compressed slip. (See RFC-1144 by Van Jacobson) This
is even compatible with non-comressing slip drivers, as it first
tries to trigger the other side of the connection into using
compression as well, but ceases these attempts if they appear
unsuccessful. In any case, once the other side starts sending
compressed headers, it is turned on in the local-to-remote direction
as well.
Corrected bugs:
--------------
- The AbortIO function erroneously assumed that A3 was the Unit
pointer. Even Commodore's official example in the RKM gets that
wrong (see page 567).
- S2_GETGLOBALSTATS always returned an error, even though it worked.
Well, it got the microseconds of the last online wrong.
- S2_TRACKTYPE had two bugs: it would always think a type that you
requested to track would not yet be tracked, even if it would
get the packet type right, which it didn't. As a result, every
call to S2_TRACKTYPE allocated memory for the statistics, yet
S2_GETTYPESTATS always claimed the type wasn't being tracked.
- S2_GETSTATIONADDRESS should return 2 addresses, the current address,
and the ROM address. It used to give only a 0.0.0.0 "ROM" address in
the wrong location. Now, it considers the address in the config
file the "ROM" address, and the one from S2_CONFIGINTERFACE is
the current address. Initially both are the same (and both are
futher ignored since they are meaningless to slip).
- S2_DEVICEQUERY didn't give all required information, and claimed a
weird size for it.
- Flags set when opening the serial device should be in io->io_SerFlags,
not in the flags argument to OpenDevice().
- Returned read requests from the serial device were sized by their
io_Length instead of io_Actual.
- Serial input could potentially overflow the input buffer.
- The code assumed, by using registered arguments, that the callback
routines would have their arguments in the correct registers. Now
the type of the pointer explicitly declares the calling convention.
- And the worst of all: it attempted this EXTREMELY STUPID TRICK:
#define SLIPBase ((struct SLIPDevice *)__builtin_getreg(14))
This is terrible!!! That people write code like this! How can you be
sure the compiler won't use A6 for a register variable somewhere and
make it unusable in the functions that it calls? In fact, SAS/C 6.2
does something like that, in ReadConfig..., when it first calls an Exec
function and then a DOS function, and in both cases fetches the
required base pointer off A6.
If you want global register variables, use a compiler that supports
them, such as gcc.
Corrected misfeatures:
---------------------
- The device now runs at the same priority as the opener. This helps
preventing starvation of the opener in case of high amounts of
input.
- Uses the serial.device's SERF_EOFMODE mode. This prevents the
slip.device from hogging the CPU at high priority, and even at equal
priority improves efficiency.
Debatable issues:
----------------
- Optionally, serial device reads are only initiated when they are
(already) requested by the caller. This is contrary to the SANA
philosophy, and therefore makes debugging protocol stacks more
difficult. On the other hand, why not use the serial device's buffer to
keep input, instead of dropping it? This also reduces CPU load in case
the device is open but unused for some reason. (As it was, the
slip.device would continually read and decode packets, even if nobody
wanted them.)
============================= Archive contents =============================
Original Packed Ratio Date Time Name
-------- ------- ----- --------- -------- -------------
1895 807 57.4% 21-Jun-93 15:35:32 COPYRIGHT
18881 6525 65.4% 29-Jun-93 16:25:34 cslip.c
9128 5692 37.6% 13-Aug-93 04:47:50 cslip.device
10893 4040 62.9% 29-Jun-93 16:05:12 cslip.h
48851 13703 71.9% 13-Aug-93 04:31:20 device_funcs.c
3443 803 76.6% 13-Aug-93 04:30:24 device_protos.h
161 115 28.5% 16-Jun-93 15:19:06 endcode.asm
2309 856 62.9% 04-Jul-93 22:25:00 Makefile.cslip
2261 840 62.8% 25-Jun-93 02:41:34 Makefile.slip
68 66 2.9% 11-Jan-93 15:53:32 readme
4215 2093 50.3% 15-Aug-93 01:00:36 README.Rhialto
6220 3836 38.3% 13-Aug-93 04:35:50 slip.device
3401 1594 53.1% 25-Jun-93 01:26:58 slip_device.asm
5599 2194 60.8% 25-Jun-93 00:44:10 slip_device.h
895 491 45.1% 11-Jan-93 15:53:32 slip_device.i
202 118 41.5% 20-Jun-93 01:57:24 slip_rev.h
244 131 46.3% 20-Jun-93 01:58:10 slip_rev.i
2 2 0.0% 20-Jun-93 01:56:16 slip_rev.rev
-------- ------- ----- --------- --------
118668 43906 63.0% 15-Aug-93 15:37:08 18 files